package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * OSS文件信息表
 * @TableName t_oss_file_info
 */
@TableName(value ="t_oss_file_info")
@Data
public class OssFileInfo implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 文件UUID
     */
    @TableField(value = "file_uuid")
    private String fileUuid;

    /**
     * 文件后缀
     */
    @TableField(value = "file_suffix")
    private String fileSuffix;

    /**
     * 原始文件名
     */
    @TableField(value = "original_name")
    private String originalName;

    /**
     * OSS对象名
     */
    @TableField(value = "oss_object_name")
    private String ossObjectName;

    /**
     * 文件大小（字节）
     */
    @TableField(value = "file_size")
    private Long fileSize;

    /**
     * MIME类型
     */
    @TableField(value = "content_type")
    private String contentType;

    /**
     * 上传时间
     */
    @TableField(value = "upload_time")
    private LocalDateTime uploadTime;
    /**
     * 文件路径
     */
    @TableField(value = "file_path")
    private String filePath;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}